package com.huluobo.a2110mvpimdemo.addGroup;

import com.hyphenate.chat.EMGroup;
import com.hyphenate.chat.EMGroupInfo;
import com.hyphenate.chat.EMGroupOptions;

import java.util.List;

/**
 * Created by LC on 2023/12/15.
 */
public interface AddGroupContract {
    interface Presenter {
        void createGroup(String groupName, String desc, String[] allMembers, String reason, EMGroupOptions option);

        void findPublicGroups(int pageSize, String cursor);

        void findJoinedGroups();

        void joinGroup(String groupId);
    }

    interface View {
        void onCreateGroupSuccess();

        void onCreateGroupFailed(String error);

        void findPublicGroupsSuccess(List<EMGroupInfo> list);

        void findPublicGroupsFailed(String error);

        void findJoinedGroupsSuccess(List<EMGroup> list);

        void findJoinedGroupsFailed(String error);

        void onJoinGroupSuccess();

        void onJoinGroupFailed(String error, int code);
    }
}
